class Setting < ApplicationRecord
  enum field_type: [:text, :area, :number, :select, :radio, :checkbox], _prefix: :field_type

  validates :field_type, presence: true
  
  def self.fetch key
    Setting.where(var: key).first.value
  end
  
end
